package com.lemon.components.video.enums;

public enum H264ProfileEnum {

	Baseline("baseline", "基本画质。支持I/P 帧，只支持无交错（Progressive）和CAVLC"),
	Main("main", "进阶画质。支持I/P/B/SP/SI 帧，只支持无交错（Progressive）和CAVLC"),
	High("high", "高级画质。在main Profile 的基础上增加了8x8内部预测、自定义量化、 无损视频编码和更多的YUV 格式");

	private String code;
	private String message;

	public static H264ProfileEnum getEnumByMessage(String message) {
		if (message == null)
			return null;
		for (H264ProfileEnum _enum : values()) {
			if (_enum.getMessage().equalsIgnoreCase(message)) {
				return _enum;
			}
		}
		return null;
	}

	/**
	 * 获取全部枚举
	 * 
	 * @return List<H264ProfileEnum>
	 */
	public static java.util.List<H264ProfileEnum> getAllEnum() {
		java.util.List<H264ProfileEnum> list = new java.util.ArrayList<H264ProfileEnum>(values().length);
		for (H264ProfileEnum _enum : values()) {
			list.add(_enum);
		}
		return list;
	}

	/**
	 * 获取全部枚举值
	 * 
	 * @return List<String>
	 */
	public static java.util.List<String> getAllEnumCode() {
		java.util.List<String> list = new java.util.ArrayList<String>(values().length);
		for (H264ProfileEnum _enum : values()) {
			list.add(_enum.getCode());
		}
		return list;
	}

	private H264ProfileEnum(String code, String message) {
		this.code = code;
		this.message = message;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
